// Simplest C++ program 

#include <iostream>

using namespace std;

bool isPrime(int n)
{
	if (n % 2 == 0) return false;
	for (int i=3; i*i<=n; i+=2){
		if (n % i == 0)
			return false;
	}
	return true;
}

int main(int argc, char *argv[])
{
	int count = 0;
    for (int x=2; x<1000; ++x)
    {
    	if (isPrime(x)){
    		cout << x << endl;
    		++count;
    	}
    }
    printf("#prime = %d\n", count);
}

